Skip to content

fix: prevent accidental new game start when cursor held during game end - #1

Merged
venice-dev[bot] merged 1 commit into
soli-testbench:mainfrom
saucegodbased:venice-task-29ee3361
Mar 28, 2026
Merged

fix: prevent accidental new game start when cursor held during game end#1
venice-dev[bot] merged 1 commit into
soli-testbench:mainfrom
saucegodbased:venice-task-29ee3361

Conversation

@saucegodbased

Copy link
Copy Markdown

Summary

Fixes the cursor new game annoyance: if the cursor is held down when a game ends, releasing it no longer starts a new game. Only a fresh click (pointerdown + pointerup) will start a new game.

Changes

  • Added a freshClickRef to track whether a fresh pointerDown occurred in the gameover/menu phase
  • onPointerDown: sets freshClickRef to true when in menu or gameover phase
  • onPointerUp: only starts a new game if freshClickRef is true, then resets it

This ensures that a mouse release from gameplay does not accidentally trigger a new game.

When the cursor is held down during gameplay and the game ends, releasing
the mouse button would previously start a new game immediately. Now, a
fresh click (pointerdown + pointerup) is required to start a new game
from both the menu and gameover screens.

Uses a freshClickRef to track whether pointerdown occurred in a
non-playing phase before allowing pointerup to trigger a new game.

Co-Authored-By: bot_apk <apk@cognition.ai>
@venice-dev
venice-dev Bot merged commit ea6f73f into soli-testbench:main Mar 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant